/* 主导航和页面布局样式 */

:root {
    --primary: #1976d2;
    --primary-light: #42a5f5;
    --primary-dark: #0d47a1;
    --primary-gradient: linear-gradient(135deg, #1976d2, #42a5f5);
    --secondary: #ff9800;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --gray: #757575;
    --gray-light: #f5f5f5;
    --gray-dark: #424242;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-sm: 4px;
    --bg-color: #f8f9fa;
    --content-width: 100%; /* 修改为100%，使内容填充整个主内容区 */
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: linear-gradient(to bottom, #2c3e50, #34495e);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    z-index: 10;
    color: #ecf0f1;
    transition: width 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo span {
    font-size: 16px;
    font-weight: 600;
    color: #ecf0f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
    /* 自定义滚动条 */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    margin: 4px 8px;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.7), rgba(52, 152, 219, 0.4));
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #3498db;
    border-radius: 0 2px 2px 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.user-info:hover img {
    border-color: #3498db;
    transform: scale(1.05);
}

.logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
}

.logout-btn:hover {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    transform: rotate(360deg);
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100vh;
    background-color: var(--bg-color);
    width: calc(100% - 240px); /* 减去侧边栏宽度 */
    transition: width 0.3s ease; /* 添加过渡效果 */
}

/* 当侧边栏折叠时调整主内容区宽度 */
.sidebar.collapsed ~ .main-content {
    width: calc(100% - 60px);
}

/* 顶部导航栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: white;
    box-shadow: var(--shadow-sm);
    z-index: 5;
    margin: 0;
    width: 100%;
}

.page-title h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-dark);
    margin: 0 0 5px 0;
    position: relative;
    display: inline-block;
}

.page-title h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

.page-title p {
    color: var(--gray);
    font-size: 14px;
    margin: 0;
}

.top-bar-actions {
    display: flex;
    align-items: center;
}

.search-bar {
    position: relative;
    margin-right: 20px;
}

.search-bar input {
    width: 250px;
    height: 38px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0 15px 0 40px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: #f5f5f5;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 16px;
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
    background-color: white;
    width: 280px;
}

.search-bar input:focus + i {
    color: var(--primary);
}

.notification, .setting {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.notification:hover, .setting:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 内容包装器 */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: var(--bg-color);
    margin: 0;
    width: 100%;
}

.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.content-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* 导航链接 */
.navigation-links, .secondary-nav, .tertiary-nav {
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navigation-links .nav-link, .secondary-nav .nav-link, .tertiary-nav .nav-link {
    padding: 8px 16px;
    margin-right: 10px;
    border-radius: var(--radius);
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 14px;
}

.navigation-links .nav-link:hover, .secondary-nav .nav-link:hover, .tertiary-nav .nav-link:hover {
    color: var(--primary);
    background-color: rgba(25, 118, 210, 0.05);
}

.navigation-links .nav-link.active, .secondary-nav .nav-link.active, .tertiary-nav .nav-link.active {
    color: var(--primary);
    background-color: rgba(25, 118, 210, 0.1);
    font-weight: 500;
}

/* 页面内容 */
.page-content {
    width: 95%; /* 修改宽度为95%，保留少量边距 */
    margin: 0 auto; /* 保持水平居中 */
    padding: 0;
}

/* 部分标题 */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-dark);
    margin: 25px 0 15px 0;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

/* 内容卡片 */
.content-card {
    background-color: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.content-card:hover {
    box-shadow: var(--shadow);
}

.content-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.content-card-title i {
    margin-right: 10px;
    font-size: 18px;
    color: var(--primary);
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.info-card {
    background-color: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.info-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
}

.info-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.info-card-text {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.5;
}

/* 价值卡片 */
.value-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.value-card {
    background-color: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    transition: all 0.3s;
    cursor: pointer;
}

.value-card:hover {
    box-shadow: var(--shadow);
}

.value-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
}

.value-content {
    flex: 1;
}

.value-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 5px;
}

.value-desc {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.4;
}

.value-metric {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-left: 15px;
}

/* 流程图 */
.flow-diagram {
    margin-bottom: 30px;
}

.flow-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 20px;
    text-align: center;
}

.flow-steps {
    display: flex;
    position: relative;
    margin: 40px 0;
}

.flow-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    z-index: 0;
}

.flow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.flow-step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 24px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
    transition: all 0.3s;
}

.flow-step-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 8px;
    text-align: center;
}

.flow-step-desc {
    color: var(--gray);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    padding: 0 10px;
}

/* 性能表格 */
.performance-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
}

.performance-table th, .performance-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
}

.performance-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: var(--gray-dark);
}

.performance-table tr:hover {
    background-color: rgba(25, 118, 210, 0.02);
}

/* 特征重要性 */
.feature-importance {
    margin-bottom: 30px;
}

.feature-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.feature-name {
    width: 180px;
    font-size: 14px;
    color: var(--gray-dark);
    margin-right: 15px;
}

.feature-bar-container {
    flex: 1;
    height: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.feature-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 5px;
    transition: width 1s ease;
}

.feature-value {
    width: 50px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-left: 15px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .info-grid, .value-cards {
        grid-template-columns: 1fr;
    }
    
    .flow-steps {
        flex-direction: column;
    }
    
    .flow-steps::before {
        top: 40px;
        left: 30px;
        right: auto;
        bottom: 40px;
        width: 2px;
        height: auto;
    }
    
    .flow-step {
        flex-direction: row;
        align-items: flex-start;
        margin-bottom: 30px;
    }
    
    .flow-step-circle {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .flow-step-content {
        text-align: left;
    }
    
    .flow-step-title, .flow-step-desc {
        text-align: left;
    }
    
    .feature-name {
        width: 120px;
    }
    
    .page-content {
        width: 95%; /* 移动端保持95%宽度 */
    }
}

/* 高亮动画 */
.highlight {
    animation: highlight-pulse 2s infinite;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(25, 118, 210, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0); }
}

/* 文档页面特殊样式 */
.document-page .main-content {
    overflow-y: auto;
}

.document-page .content-wrapper {
    padding: 0;
    overflow: visible;
}

.document-page .sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
}

/* 文档内容样式 */
.document-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* SVG图表容器 */
.svg-container {
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.svg-container svg {
    width: 100%;
    height: auto;
    max-width: 800px;
    margin: 0 auto;
    display: block;
} 